<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>爱选</title>
<meta name="keywords" content="" />
<meta name="description"  content="" />
<link href="static/css/ixuan.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/static/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/static/js/i.js"></script>
</head>
<body>
<div class="top">
    <div class="header">
      <div class="logo"><a href="http://localhost:8080"><img src="/static/images/logo.gif" alt="爱选" /><a href="localhost:8080"><img src="/static/images/logotext.gif" alt="爱选" /></a></div>
      
      <div class="headInfo">
          {% if user %}<div class="myInfo">您好，{{ user.nickname }} !  <a href="/userhome/{{ user.uid }}">我的爱选</a> <a href="/account/"> 个人中心 </a>  <a href="/logout/">退出</a></div>
{% else %}<div class="myInfo"><a href="/login/">登录</a>  <a href="/register/">注册</a></div>{% endif %}
          <div class="search"><input name="" type="text" class="seaIn" /><input name="" type="button" class="seaSo" value="搜索"/></div>
      </div>
    </div>
</div>
<div class="wrapper">
    <div class="main">
        <h2>&gt; 热门分类</h2>
      	<div class="type">
            <ul>
            {% for type in types %}
                <li class="{{type.class}}" style="z-index:8"><a href="/type/{{type.tid}}/"><span></span>{{type.name}}</a><span class="hoverShow" style="display: none;">一句话的简单介绍一句话的简单介绍一句话的简单介绍一句话的简单介绍</span></li>
            {% endfor %}
            </ul>
        </div>
        <div class="clear"></div>
        <h2>&gt; 最新动态</h2>
        <div class="newDo">
            <ul>
            {% for problem in list_pro %}
                <li><a href="/userhome/{{ problem.uid }}/"><img src="{{ problem.image }}" class="userImg" alt="" /></a><a href="/userhome/{{ problem.uid }}/">{{ problem.nickname }}</a>发表了投票<a href="/problem/{{ problem.pid }}/">{{ problem.title }}</a></li>
            {% endfor %}
            {% for answer in list_ans %}
                <li><a href="/userhome/{{ comment.uid }}/"><img src="{{ comment.image }}" class="userImg" alt="" /></a><a href="/userhome/{{ comment.uid }}／">{{ comment.nickname }}</a>回应了投票<a href="/problem/{{ comment.pid }}">(a)</a><br /><span>{{ comment.content }}</span></li>
            {% endfor%}
            </ul>
        </div>
    </div>
    <div class="right">
        {% if user %}        
        {% else %}
        <form action="/login/" method = "post">
        <div class="loginIn">
            <i class="lt"></i><i class="rt"></i><i class="lb"></i><i class="rb"></i>
            <div class="loginFo">
                <h3>用户登录</h3>
                <div class="userEmail"><input name="email" type="text" /></div>
                <div class="userPass"><input name="passwd" type="password" /></div>
                <div class="userYes"><input name="remember" type="checkbox" value="on" /> 记住我<input name="" type="submit" class="checkNow" value="登录" /></div>
            </div>
        </div>
        </form>
        {% endif %}
        <a href="#"><img src="static/images/addnow.gif" alt="立即注册" /></a>
        <div class="h10"></div>
       <a href=/problem/create/><img src="/static/images/tounow.gif" alt="立即发起投票" /></a>
        <div class="hot">
            <div class="hotTie">
                <ul>
                    <li id="month" class="hotN">本月热门投票</li>
                    <li id="week">本周热门投票</li>
                </ul>
            </div>
            <div class="hotCon">
            	<ol class="month">
                	{% for p in monthHotProblems %}
                	<li><a href="/problem/{{ p.pid }}/">{{ p.title }}</a></li>
            		{% endfor %}            	
            	</ol>
            	<ol class="week" style="display:none">
                	{% for p in weekHotProblems %}
                	<li><a href="/problem/{{ p.pid }}/">{{ p.title }}</a></li>
            		{% endfor %}            	
            	</ol>
            </div>
        </div>
    </div>
</div>
<div class="foot">
    <div>关于我们 · 联系我们 · 意见反馈   © 2011 dXXXX.com, all rights reserved                                         ICP：34325434667</div>
</div>
</body>
</html>
